<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>智慧城市 - 景区详情</title>
<link type="text/css" rel="stylesheet" href="css/s_detail.css"/>
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/s_detail.js"></script>
<script type="text/javascript" src="js/index.js"></script>
</head>

<body>
	<header style="background:#006291;height:70px;width:100%;">
    	<img style="height:70px;margin-left:30px;" src="images/title.png" alt="智慧城市">
        <ul style="height:70px;list-style:none;position:absolute;top:0;right:30px;font-family:'幼圆';">
        	<li style="height:70px;width:120px;line-height:70px;font-size:20px;float:left;text-align:center;">
            	<a style="color:white;text-decoration:none;" href="tickets.html">车票/机票</a>
            </li>
        	<li style="height:70px;width:120px;line-height:70px;font-size:20px;float:left;text-align:center;">
            	<a style="color:white;text-decoration:none;" href="search.html">出行</a>
            </li>
        	<li style="height:70px;width:120px;line-height:70px;font-size:20px;float:left;text-align:center;">
            	<a style="color:white;text-decoration:none;" href="index.jsp">返回首页</a>
            </li>
        </ul>
    </header>
    <div class="content">
    	<div class="left_c">
            <div class="scenery_info">
                <div class="s_info_left">
                    <img src="${sessionScope.oneLocalInfo.lpic}" alt="${sessionScope.oneLocalInfo.lname}">
                    <p style="height:30px;margin-top:20px;text-align:right;">
                        <a id="show_vedio_btn" href="javascript:playVideo('${sessionScope.oneLocalInfo.lvideo}')">观看相关视频</a>
                        <a id="show_bbs_btn" href="javascript:goBBS(${sessionScope.oneLocalInfo.lid})">旅游论坛</a>
                    </p>
                </div>
                <div class="s_info_right">
                    <div>
                        <h2 id="scenery_name">${sessionScope.oneLocalInfo.lname}</h2>
                    </div>
                    <div id="scenery_intro">
                    	简介：<span>${sessionScope.oneLocalInfo.ltext}</span>
                        <br>景区类型：<span>${sessionScope.oneLocalInfo.ltype}</span>
                        <br>最佳季节：<span>${sessionScope.oneLocalInfo.lseason}</span>
                        <br>开放时间：<span>${sessionScope.oneLocalInfo.ltime}</span>
                        <br>地址：<span>${sessionScope.oneLocalInfo.laddr}</span>
                        <br>电话：<span>${sessionScope.oneLocalInfo.ltel}</span>
                    </div>
                </div>
            </div>
            <div class="scenery_ticket">
                <p class="p_title">门票信息</p>
                <table id="ticket_table" border="0px" cellspacing="0px" style="border-collapse:collapse;width:800px;text-align:center;margin:20px 0 0 10px;">
                	<script>
                	$(function(){
                		var url=location.href;
                		var lid=url.substring(url.indexOf("=") + 1, url.length);
                		$.ajax({
                		    url: "../json/Ticket_getOneTicket",    //请求的url地址
                		    dataType: "json",   //返回格式为json
                		    async: true, //请求是否异步，默认为异步，这也是ajax重要特性
                		    type: "POST",
                		    data:{"lid":lid},
                		    success: function(data) {
                		    	var info="";
                		    	$.each(data.rows,function(index,item){
                		    		info+="<tr style='height:40px;'><td>"+item.ttype+"</td><td style='font-size:12px;color:#666;'>提前一天22:00前</td>";
                		    		info+="<td style='font-size:14px;color:#FF9A35;font-weight:bold;'>￥<span>"+item.tprice+"</span></td>";
                		    		info+="<td><input class='yd_btn' type='button' value='预定' onClick='ticketYd()'/>";
                		    		info+="<input type='hidden' id='ticket_info' value='"+item.ttype+"'></td></tr>";
                		    	});
                		    	$("#ticket_table").html(info);
                		    }
                		});
                	});
                </script>
                </table>
            </div>
            <div class="scenery_hotel">
                <p class="p_title">附近宾馆</p>
                <table id="hotel_table" border="0px" cellspacing="0px" style="border-collapse:collapse;width:800px;text-align:center;margin:20px 0 0 10px;">
	                <script>
	                	$(function(){
	                		var url=location.href;
	                		var lid=url.substring(url.indexOf("=") + 1, url.length);
	                		$.ajax({
	                		    url: "../json/Hotel_getOneHotel",    //请求的url地址
	                		    dataType: "json",   //返回格式为json
	                		    async: true, //请求是否异步，默认为异步，这也是ajax重要特性
	                		    type: "POST",
	                		    data:{"lid":lid},
	                		    success: function(data) {
	                		    	var info="";
	                		    	$.each(data.rows,function(index,item){
	                		    		console.info(item);
	                		    		info+="<tr style='height:40px;'><td>"+item.hname+"</td><td style='font-size:12px;'>"+item.htype+"</td>";
	                		    		info+="<td style='font-size:12px;color:#666;'>地址："+item.haddr+"</td><td style='font-size:12px;color:#666;'>联系方式："+item.htel+"</td>";
	                		    		info+="<td style='font-size:14px;color:#FF9A35;font-weight:bold;'>￥<span>"+item.hprice+"</span></td>";
	                		    		info+="<td><input class='yd_btn' type='button' value='预定' onClick='hotelYd()'/>";
	                		    		info+="<input id='hotel_info' type='hidden' value='"+item.hname+"'/></td></tr>";
	                		    	});
	                		    	$("#hotel_table").html(info);
	                		    }
	                		});
	                	});
	                </script>
                </table>
            </div>
        </div>
        <div class="right_c">
            <div class="hot_tui">
                <p class="p_title">热门推荐</p>
                <ul id="title_ul">
                <script>
                $(function(){
            		$.ajax({
            		    url: "../json/LocalInfo_getLocalInfoList",    //请求的url地址
            		    dataType: "json",   //返回格式为json
            		    async: true, //请求是否异步，默认为异步，这也是ajax重要特性
            		    type: "POST",
            		    success: function(data) {
            		    	var info="";
            		    	$.each(data.rows,function(index,item){
            		    		info+="<li><a href='javascript:lookDetail("+item.lid+")'><img src='"+item.lpic+"' alt='"+item.lname+"'></a>";
            		    		info+="<p>"+item.lname+"</p><p>适宜"+item.lseason+"</p></li>";
            		    	});
            		    	$("#title_ul").html(info);
            		    }
            		});
                });
                </script>
                </ul>
            </div>
        </div>
    </div>
    <footer style="height:70px;background:#E6E6E6;clear:both;">
    	<p style="line-height:70px;font-size:16px;text-align:center;">CopyRight &copy; 智慧城市 - 衡阳 All rights reserved.</p>
    </footer>
</body>
</html>
